home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4464 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.0 KB

  1. Path: informatik.tu-muenchen.de!ganterth
  2. From: ganterth@mathematik.tu-muenchen.de (Thomas Ganter)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Need little C Help! (How to make caracters apear on the same spot again and again?)
  5. Date: 27 Feb 1996 11:10:43 GMT
  6. Organization: Math. Institut der TU Muenchen
  7. Distribution: world
  8. Message-ID: <1996Feb27.121043@mathematik.tu-muenchen.de>
  9. References: <4gjudo$i95@news.xs4all.nl> <1996Feb23.123038@mathematik.tu-muenchen.de> <4gnl18$rg6@news.iastate.edu>
  10. NNTP-Posting-Host: sunbulirsch5.mathematik.tu-muenchen.de
  11. X-newsreader: xrn 7.00
  12.  
  13. In article <4gnl18$rg6@news.iastate.edu>, pholland@iastate.edu (Paul J Hollander) writes:
  14. |> In article <1996Feb23.123038@mathematik.tu-muenchen.de>,
  15. |> Thomas Ganter <ganterth@mathematik.tu-muenchen.de> wrote:
  16. |> >In article <4gjudo$i95@news.xs4all.nl>, vasquez@xs4all.nl (Joel Wijngaarde) writes:
  17. |> >|> Hello,
  18. |> >|> 
  19. |> >|> Can somebody tel me how i can make a counter in C wich counts at the same 
  20. |> >|> screen position. I'm mean something like the in the program 'Lha'. This 
  21. |> >|> program counts the bytes, that are (un)packed. The number of bytes 
  22. |> >|> increases on the same spot; NOT like this: 
  23. |> >|> 1 2 3 4 5 6 7 8 9 10 11 12 etc....
  24. |> >
  25. |> >Try out the CIS controll sequences. I don't have RKRM's at hand,
  26. |> >but there are command sequences like ESC[A, ESC[B, ... to move the
  27. |> >cursor around. If you have the RKRM's, inspect the console.device part,
  28. |> >else repost here for a compilation of important sequences.
  29. |> 
  30. |> I've been working through _Amiga C for Beginners_.  It has a list of
  31. |> escape sequences like \n for new line, \t for tab, etc.  One of them
  32. |> returned the cursor to the first position of the current line.  It might
  33. |> have been \s, but the book is at home instead of beside me.  You could
  34. |> print the count, go to the start of the line, print a series of spaces to
  35. |> blank the line, go to the start of the line again, print the new count,
  36. |> etc.
  37.  
  38. Those (\n \r \t \b) are no escape sequences but control characters.
  39. Escape sequences begin with an escape character (\033) and are capable
  40. of performing various, sometimes complex jobs. I also don't have my book
  41. beside me at the moment, but you should be able to find them in the
  42. console.device specs, even perhaps in the standard include files (I remember
  43. having seen some there, but perhaps they were for printer.device ...??).
  44.  
  45. If you can't get hold of them, i could also compile a list if codes i know
  46. and mail them to you.
  47.  
  48. -- 
  49.  
  50.                         - Thomas
  51.  
  52. ------------------------------------------------------------------------------
  53.   Thomas Ganter, cand.math.    A3000 18MB 2.8GB HD  -  ex AMIGA Developer
  54.   Postweg 3            email: ganterth@mathematik.tu-muenchen.de
  55.   83209 Prien am Chiemsee    FAX  : (0) 8051 - 63179
  56.   Bavaria, Germany        Phone: (0) 8051 - 61895 & 62054
  57. ------------------------------------------------------------------------------
  58.   Mathematicians are like Frenchmen: whenever you say something to them,
  59.   they translate it into their own language, and at once it is something
  60.   entirely different.                     J. W. v. Goethe
  61.  
  62.